﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using App.BaseObject;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace App.Goods
{
    /// <summary>
    /// 商品分类
    /// </summary>
    public class ProductCategory : AuditedEntity, IMayHaveTenant
    {
        [StringLength(ColumnSetting.Short)]
        public virtual string CategoryName { get; set; }
        public virtual int? ParentId { get; set; }
        [ForeignKey("ParentId")]
        public virtual ICollection<ProductCategory> ChildCategorys { get; set; }
        public virtual ICollection<Product> Products { get; set; }
        public virtual int? TenantId { get; set; }
    }
}
